package com.zyz.E_面向对象.E_封装;

/**
 * @author: vick
 * @Date: 2025/3/14
 * @Description:
 * @version: 1.0
 */
public class BankAccountTest {
    public static void main(String[] args) {
        BankAccount bankAccount = new BankAccount(1000);
        bankAccount.sout();//输出当前余额

        bankAccount.deposit(500); //存款
        bankAccount.sout();//输出当前余额

        bankAccount.withdraw(200); //取款
        bankAccount.sout();//输出当前余额

        bankAccount.withdraw(1500); //尝试取款超过余额
        bankAccount.deposit(-200); //尝试存入无效金额
    }
}
